<?php
namespace Admin\Controller;

use Utuo\BackgroundController;

class SystemController extends BackgroundController {
	
	public function _initialize() {
		$this->setControllerTitle("系统信息设置");
		$this->setActionTitle(array(
			'index' => "设置"
		));
	}
	
	// 系统信息设置
	public function indexAction() {
		$system = M("System")->find();
		$this->assign("system", $system);
		$this->display();
	}
	
	// 保存
	public function savePostAction() {
		$m = D("System");
		$m->create() and false !== $m->save() and $this->ajaxSuccess();
		$this->ajaxError();
	}
}